package A_Druid;

import java.util.Objects;

public class Emp1 {
    private int eid;
    private String ename;
    private String sex;

    public Emp1(){}
    public Emp1(int eid, String ename, String sex) {
        this.eid = eid;
        this.ename = ename;
        this.sex = sex;
    }

    public Integer getEid() {
        return eid;
    }

    public void setEid(Integer eid) {
        this.eid = eid;
    }

    public String getEname() {
        return ename;
    }

    public void setEname(String ename) {
        this.ename = ename;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Emp1 emp1 = (Emp1) o;
        return Objects.equals(eid, emp1.eid) && Objects.equals(ename, emp1.ename) && Objects.equals(sex, emp1.sex);
    }

    @Override
    public int hashCode() {
        return Objects.hash(eid, ename, sex);
    }

    @Override
    public String toString() {
        return "Emp1{" +
                "eid=" + eid +
                ", ename='" + ename + '\'' +
                ", sex='" + sex + '\'' +
                '}';
    }

}
